package com.bdqn.business.academic.controller;

import com.bdqn.aop.Log;
import com.bdqn.business.academic.service.SingleService;
import com.bdqn.entity.academic.Single;
import com.bdqn.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/single")
public class SingleController {


    @Autowired
    private SingleService singleService;

    @Log("获得单选列表")
    @RequestMapping(value = "/getList",method = RequestMethod.POST)
    public Result getList(@RequestBody Map<String,Object> map){
        return singleService.getList(map);
    }


    @Log("录入单选题")
    @RequestMapping(value = "/saveSingle",method = RequestMethod.POST)
    public Result saveSingle(@RequestBody Single single){
        return singleService.saveSingle(single);
    }
}
